//
//  JMHomeTipsView.m
//  NewiOSProject
//
//  Created by JMMac on 25.12.23.
//  Copyright © 2023 范智渊. All rights reserved.
//

#import "JMHomeTipsView.h"

@implementation JMHomeTipsView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = Hex_Str_COLOR(@"#F2F0FF");
        UIView *topV = [[UIView alloc]initWithFrame:(CGRectMake(0, 0, frame.size.width, 40))];
        topV.backgroundColor = Hex_Str_COLOR(@"#E9E8FF");
        [self addSubview:topV];
        
        UIImageView *warnImgV = [[UIImageView alloc]initWithFrame:(CGRectMake(12, 8, 24, 24))];
        warnImgV.image = ImageNamed(@"home_warm");
        [self addSubview:warnImgV];
        
        UILabel *titleLab = [JMControl createLabelWithFrame:(CGRectMake(warnImgV.right+4, 0, kAppW(), 40)) Font:fontWithWeight(17, UIFontWeightRegular) Text:@"Recordatorio de Seguridad" color:mainSchemeColor()];;
        [self addSubview:titleLab];
        
        UILabel *contentLab = [JMControl createLabelWithFrame:(CGRectMake(12, 40, frame.size.width-24, 80)) Font:Font(14) Text:@"Los métodos de pago solo incluyen STP, TransferY OXXO,otras cuentas bancarias no son válidas, preste especial atención" color:Hex_Str_COLOR(@"#555555") textAlignment:0 numberOfLine:0];
        [self addSubview:contentLab];
        [JMControl changeTextColorWithLabel:contentLab changeStr:@"STP, TransferY OXXO," color:mainSchemeColor()];
    }
    return self;
}

@end
